

package com.zmks.jkgj.xuexiao.controller;




import java.util.Date;

import javax.servlet.http.HttpServletRequest;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;


import com.zmks.jkgj.core.controller.ABaseController;
import com.zmks.jkgj.core.resp.Resp;
import com.zmks.jkgj.xuexiao.resp.WebResp;
import com.zmks.jkgj.xuexiao.service.ICrctObjMessageSchoolService;
import com.zmks.jkgj.xuexiao.service.ICrctObjTeacherService;
import com.zmks.jkgj.xuexiao.vo.CrctObjMessageSchoolVO;
import com.zmks.jkgj.xuexiao.vo.CrctObjSchoolVO;

@Controller
public class CrctObjMessageSchoolController extends ABaseController {
	
	
	@Autowired
	private ICrctObjMessageSchoolService crctObjMessageSchoolService;	
	
	 //查询用户
	@RequestMapping("/get_CrctObjMessageSchool_list")
	@ResponseBody
	public Resp get_CrctObjMessageSchool_list( Integer pageIndex,
			Integer pageSize,HttpServletRequest request) {
		WebResp 	webResp = new WebResp();
		CrctObjMessageSchoolVO crctObjMessageSchoolVO=new  CrctObjMessageSchoolVO();
		webResp.setData(crctObjMessageSchoolService.getList(crctObjMessageSchoolVO));
		webResp.setTotalCount(crctObjMessageSchoolService.getCount(crctObjMessageSchoolVO));
		return webResp;
	}
	
	 //发送通知
	@RequestMapping("/save_CrctObjMessageSchool")
	@ResponseBody
	public Resp save_CrctObjMessageSchool(String  msg,String scope ,HttpServletRequest request) {
		WebResp 	webResp = new WebResp();
		CrctObjMessageSchoolVO crctObjMessageSchoolVO=new  CrctObjMessageSchoolVO();
		crctObjMessageSchoolVO.setScope(scope);

		crctObjMessageSchoolVO.setMsg(msg);
		crctObjMessageSchoolVO.setSchool_oid(20L);
		crctObjMessageSchoolVO.setCreate_date(new Date());
		crctObjMessageSchoolService.save(crctObjMessageSchoolVO);
		return webResp;
	}
	

}
